<!-- #INCLUDE Virtual="/lib.asp" -->
<!-- #INCLUDE Virtual="/lib_gen.asp" -->

<%
dim rss, objXMLDom, objXMLdata
dim rssTitle, rssInhoud, rssImage
const rssError = "Geen RSS data ontvangen"
rssInhoud = rssError

rss = getExternalHTML("http://rss.politie.nl/rss/algemeen/ob/alle-gezochtberichten.xml")

Set objXMLDom = Server.CreateObject("Microsoft.XMLDOM")
objXMLDom.preserveWhiteSpace = true
objXMLDom.async = false
objXMLDom.resolveExternals = false

objXMLDom.setProperty "SelectionNamespaces", "xmlns:media='http://search.yahoo.com/mrss/'"

on error resume next

objXMLDom.loadXML(rss)
Set objXMLdata = objXMLDom.documentElement

for each item in objXMLdata.selectNodes("//item[0]")
	rssTitle = item.selectSingleNode("title").text
	rssInhoud = item.selectSingleNode("description").text
	rssImage = ""
	
	for each media in item.selectNodes("./media:content[@medium='image']")
		if rssImage = "" then rssImage = media.getAttribute("url")
	next
next

call generatePage(request("preview"), request.querystring("nextpage"), rssTitle, rssImage, rssInhoud)
%>